using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Constants;

public partial class forums_masterpages_default : System.Web.UI.MasterPage
{
    public void UpdateLoginPanel(UserViewMode Mode)
    {
        LoginPanel1.Mode = Mode;
    }

    public void UserLoggedIn(object sender, EventArgs e)
    {
        AdminLink1.Refresh();
    }

    public void UserLoggedOut(object sender, EventArgs e)
    {
        AdminLink1.Refresh();
    }

    public void Page_PreRender(object sender, EventArgs e)
    {
        DAL.User myUser = Managers.UserLoginManager.CurrentUser;
        if (myUser != null)
        {
            myUser.LastActivityDate = DateTime.Now;
            DAL.Users.Save(myUser);
        }
    }
}
